Conversation
74116e0 to
5df7278
Compare
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Walkthrough: This PR extends the existing Dependabot lockfile-regeneration workflow to also handle build and lint failures after a dependency bump. When pnpm run build or pnpm exec eslint . fails, the workflow now invokes anthropics/claude-code-action@v1 to diagnose and fix the issue automatically, then commit+push back to the branch. Changes:
Review Notes:
|
Review SummaryThis PR extends the Dependabot lockfile workflow to invoke Claude when build/lint fails after a dependency bump. The idea is sound, but there are two bugs that together mean the auto-fix feature will never work correctly as written. Bug 1 — Shell substitution in
|
After regenerating the lockfile, the workflow now attempts to build and lint. If either fails, Claude Code is invoked to diagnose and fix the issue with minimal changes, then commit and push the fix.
- Add set -o pipefail so build/lint exit codes propagate through tee - Capture error output in step outputs instead of using $() in direct_prompt (GitHub Actions doesn't expand shell substitution in with: values)
The cat output was going to stdout instead of the output file. Use a group command to redirect everything to GITHUB_OUTPUT together.
1bd90ed to
8dad0a5
Compare
There was a problem hiding this comment.
Pull request overview
Updates the Dependabot lockfile regeneration workflow to also attempt automatic remediation of build/lint failures in Dependabot PRs by invoking the Claude Code action.
Changes:
- Renames the workflow/job and increases timeout.
- Expands workflow permissions and adds build + lint attempts with captured error output.
- Adds an automated “fix with Claude” step that can commit/push changes back to the Dependabot PR branch.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
- Move git config before any steps that might commit, so Claude's
commits don't fail when lockfile is unchanged but code fixes are needed
- Truncate build/lint output to last 200 lines to avoid GITHUB_OUTPUT
size limits
- Use accurate fallback messages ("No build output captured" / "Lint
was not run") instead of misleading "succeeded" text
Lockfile regen now works, however, the dependabot PRs still fail due to us needing to make some code changes to adhere to updated packages.
This PR adds Claude to the workflow so it can attempt to address any easy fixes